package com.midea.mgc.mgcaigc.web;

import com.midea.mgc.mgcaigc.entity.AjaxMessageEntity;
import com.midea.mgc.mgcaigc.service.InteractionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/mgc")
public class InteractionController {

    @Autowired
    private InteractionService interactionService;

    @PostMapping("/aigc")
    @ResponseBody
    public AjaxMessageEntity query(@RequestBody String ask) {

        AjaxMessageEntity ans = interactionService.query(ask);

        return ans;
    }

}
